package com.jindun.paper.ui.bag.bean;

import java.util.ArrayList;
import java.util.List;

public class BagOrderItemInputBean {
	private int layer;
	private int stubSpec;
	private int clientReportStubQty;
	private double clientReportAvgBagQtyPerStub;
	private int singularBagQty;
	private double price;
	private double allowancePrice;
	private double otherAmount;
	private List<Double> stubQtyList = new ArrayList<Double>();
	private List<Double> checkedBagQtyList  = new ArrayList<Double>();
	
	private boolean adjustExclusion;
	
	private int adjustExclusionQty;
	
	
	public boolean isAdjustExclusion() {
		return adjustExclusion;
	}
	public void setAdjustExclusion(boolean adjustExclusion) {
		this.adjustExclusion = adjustExclusion;
	}
	public int getAdjustExclusionQty() {
		return adjustExclusionQty;
	}
	public void setAdjustExclusionQty(int adjustExclusionQty) {
		this.adjustExclusionQty = adjustExclusionQty;
	}
	public int getLayer() {
		return layer;
	}
	public void setLayer(int layer) {
		this.layer = layer;
	}
	public int getStubSpec() {
		return stubSpec;
	}
	public void setStubSpec(int stubSpec) {
		this.stubSpec = stubSpec;
	}
	public int getClientReportStubQty() {
		return clientReportStubQty;
	}
	public void setClientReportStubQty(int clientReportStubQty) {
		this.clientReportStubQty = clientReportStubQty;
	}
	public double getClientReportAvgBagQtyPerStub() {
		return clientReportAvgBagQtyPerStub;
	}
	public void setClientReportAvgBagQtyPerStub(double clientReportAvgBagQtyPerStub) {
		this.clientReportAvgBagQtyPerStub = clientReportAvgBagQtyPerStub;
	}
	public int getSingularBagQty() {
		return singularBagQty;
	}
	public void setSingularBagQty(int singularBagQty) {
		this.singularBagQty = singularBagQty;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public double getAllowancePrice() {
		return allowancePrice;
	}
	public void setAllowancePrice(double allowancePrice) {
		this.allowancePrice = allowancePrice;
	}
	public double getOtherAmount() {
		return otherAmount;
	}
	public void setOtherAmount(double otherAmount) {
		this.otherAmount = otherAmount;
	}
	public List<Double> getStubQtyList() {
		return stubQtyList;
	}
	public void setStubQtyList(List<Double> stubQtyList) {
		this.stubQtyList = stubQtyList;
	}
	public List<Double> getCheckedBagQtyList() {
		return checkedBagQtyList;
	}
	public void setCheckedBagQtyList(List<Double> checkedBagQtyList) {
		this.checkedBagQtyList = checkedBagQtyList;
	}
	
	public List<Double> getStandartBagQtyList () {
		List<Double> list = new ArrayList<Double> ();
		for (Double qty : checkedBagQtyList) {
			list.add(qty * this.layer / 4.0);
		}
		return list;	
	}
	
	public Double getStandardStubSpec () {
		return this.layer  / 4.0 * this.stubSpec;
	}
	
	
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + layer;
		result = prime * result + stubSpec;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BagOrderItemInputBean other = (BagOrderItemInputBean) obj;
		if (layer != other.layer)
			return false;
		if (stubSpec != other.stubSpec)
			return false;
		return true;
	}
	
	
	
	

}
